package com.zlcx.tz.live.enums;

/**
 * @AUTHOR xhl
 * @CREATE 2019-04-18 16:16
 **/
public enum RoomMicStatus {

    MIC_ON( "开麦", 1),
    MIC_OFF( "禁麦", 0);

    RoomMicStatus( String tips, int code) {
        this.tips = tips;
        this.code = code;
    }

    private String tips;
    private int code;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getTips() {
        return tips;
    }

    public void setTips(String tips) {
        this.tips = tips;
    }

    public static RoomMicStatus getRoomMicStatus(int code) {
        for (RoomMicStatus field : RoomMicStatus.values()) {
            if (code == field.getCode()) {
                return field;
            }
        }
        return null;
    }
}
